const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
      // 解决路径别名和文件拓展的问题
    resolve: {
      alias: {
        'api': '@/api',
        'assets': '@/assets',
        'components': '@/components',
        'views': '@/views',
      }
    }
  },
  devServer: {
    open: false,
    proxy: {
    '/proxy': {
        target: 'http://127.0.0.1:4000/',
        changeOrgin: true,
        pathRewrite: {
          '^/proxy': ''
        }
      }
    }
  }
})
